<template>
  <div>
    <el-form ref="form" :model="user_form" label-width="80px">
      <el-form-item label="用户名">
        <el-input v-model="user_form.username"></el-input>
      </el-form-item>
      <el-form-item label="密码">
        <el-input type="password" v-model="user_form.password"></el-input>
      </el-form-item>
      <el-form-item label="昵称">
        <el-input v-model="user_form.nickname"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="createUserSubmit">确 定</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  name: "CreateUser",
  data() {
    return {
      user_form: {
        username: '',
        password: '',
        nickname: '',
      }
    }
  },
  methods: {
    createUserSubmit(){
      this.$emit("createUserSubmit",this.user_form)
    },
    empty_user_form(){
      this.user_form={
        username: '',
        password: '',
        nickname: '',
      }
    }
  }
}
</script>

<style scoped>

</style>